This sample was designed to be run from the command line. We have included options to search for a specific barcode type, list all supported barcode types, and print how to use this sample. The only requirement is that you specify a path to the image you want to scan for barcodes.
To run the sample using the .Net CLI, use the "dotnet run" command and specify an image path. This will build and run the sample.
Run the sample |
Copy Code |
---|---|
dotnet run path/to/your/image.jpg |
Scan for a specific barcode type |
Copy Code |
---|---|
dotnet run -t QRCode path/to/your/image.bmp |
Scan for more than one barcode type |
Copy Code |
---|---|
dotnet run -t QRCode -t Aztec path/to/your/image.png |
List all the barcode types |
Copy Code |
---|---|
dotnet run -l |
Print usage |
Copy Code |
---|---|
dotnet run -u |
To run the sample using Visual Studio:
The following are examples showing how to use the Application arguments for this sample.
Run the sample |
Copy Code |
---|---|
path/to/your/image.jpg |
Scan for a specific barcode type |
Copy Code |
---|---|
-t QRCode path/to/your/image.bmp |
Scan for more than one barcode type |
Copy Code |
---|---|
-t QRCode -t Aztec path/to/your/image.png |
List all the barcode types |
Copy Code |
---|---|
-l |
Print usage |
Copy Code |
---|---|
-u |